home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 232
/
232.d81
/
adventure shell
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
778b
|
22 lines
100 v=0:n=0:ne$="":n$="":n2$="":v$="":v2$="":pr=0:pt=0:nm=0:bz=0
101 forx=1to10:wd$(x)="":next
102 inputa$:pt=1:nm=0:d$=a$
103 fora=1tolen(d$)
104 ifmid$(d$,a,1)=" "thena$=mid$(d$,pt,a-pt):pt=a+1:nm=nm+1:wd$(nm)=a$
105 next:nm=nm+1:a$=mid$(d$,pt,a-pt):wd$(nm)=a$
106 v$=wd$(1):ne$=wd$(2)
107 ifwd$(3)="and" orwd$(3)="then"thenv2$=wd$(4):n2$=wd$(5):co=1
108 ifwd$(3)="in"orwd$(3)="from"orwd$(3)="to"thenv$=wd$(1):ne$=wd$(2):pr=1:bz=1
109 rem ---------------------
110 v=0:forx=1to20:ifv$=vb$(x)thenv=x:x=30
111 next:ifv=0thenprint"[215]hat? [195]heck your verb.":goto100
112 n=0:forx=1to299:ifne$=no$(x)thenn=x:x=299
113 next:ifn=0thenprint"[200]uh? [195]heck your noun.":goto100
114 on v gosub120,130,140,150,160,170,180,190,200,210
115 ifco=1thenco=0:goto110
116 goto100
117 rem ----------------------
9999 end
10000 d=peek(186):open15,d,15,"i0":n$="adventure shell"
10001 print#15,"s0:"+n$:close1:saven$,d:end